package com.hulk.ratel.persistence.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.hulk.ratel.persistence.entity.SuperEntity;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author hulk
 * @since 2021-03-13
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_org_info")
public class OrgInfo extends SuperEntity<OrgInfo> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("org_code")
    private String orgCode;

    /**
     * 与out_partner_code相同
     */
    @TableField("out_org_code")
    private String outOrgCode;

    @TableField("org_name")
    private String orgName;

    /**
     * 01-1级 02-2级
     */
    @TableField("org_grade")
    private String orgGrade;

    @TableField("org_intro")
    private String orgIntro;

    /**
     * HTTP HTTPS TCP CXF TUXEDO
     */
    @TableField("network_protocol")
    private String networkProtocol;

    @TableField("ip")
    private String ip;

    @TableField("port")
    private Integer port;

    @TableField("uri")
    private String uri;

    /**
     * XML,JSON
     */
    @TableField("serialization_mode")
    private String serializationMode;

    /**
     * Y-启用 N-关闭
     */
    @TableField("use_flag")
    private String useFlag;

    @TableField("org_security_key")
    private String orgSecurityKey;

    @TableField("start_date")
    private LocalDate startDate;

    @TableField("expiry_date")
    private LocalDate expiryDate;

    @TableField("contact_name")
    private String contactName;

    @TableField("contact_mobile")
    private String contactMobile;

    @TableField("contact_phone")
    private String contactPhone;

    @TableField("contact_fax")
    private String contactFax;

    @TableField("f_linkman_name")
    private String fLinkmanName;

    @TableField("f_linkman_phone")
    private String fLinkmanPhone;

    @TableField("f_linkman_fax")
    private String fLinkmanFax;

    @TableField("f_linkman_email")
    private String fLinkmanEmail;

    @TableField("contact_email")
    private String contactEmail;

    @TableField("remark")
    private String remark;

    @TableField("created_by")
    private String createdBy;

    @TableField(value = "created_time", fill = FieldFill.INSERT)
    private LocalDateTime createdTime;

    @TableField("audited_time")
    private LocalDateTime auditedTime;

    /**
     * N-未审核 Y-已审核 U-已修改
     */
    @TableField("audited_flag")
    private String auditedFlag;

    @TableField("audited_by")
    private String auditedBy;

    @TableField("updated_by")
    private String updatedBy;

    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedTime;

    @TableField("ori_id")
    private String oriId;

    @TableField("tenant_id")
    private String tenantId;

    @TableField("rsv1")
    private String rsv1;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
